package unit2_1010.test6;

public class Cat extends Pet {
	
	private int lazy;

	public int getLazy() {
		return lazy;
	}

	public void setLazy(int lazy) {
		if (lazy < 1 || lazy > 10) {
			System.out.println("有效亲密度在1-10之间，默认为5");
			lazy = 5;
		}
		this.lazy = lazy;
	}
	
	@Override
	public void show() {
		System.out.println("宠物猫自白：\n" + "昵称：" + getName() + ",性别：" + 
					getSex() + ",健康值：" + getHealth() + ",懒度：" + lazy);
		
	}
	
}
